﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace PES_TurnierManager
{
    /// <summary>
    /// Interaktionslogik für MatchupRow.xaml
    /// </summary>
    public partial class MatchupRow : UserControl
    {
        private uint mMatchID;
        private ResultButton mResultButton;

        public MatchupRow(uint matchID)
        {
            InitializeComponent();
            mMatchID = matchID;
            mMatchIDBlock.Text = mMatchID.ToString();

            mResultButton = new ResultButton(mHomeBlock, mGuestBlock, mMatchupBlock);
            mResultButton.setMatchID(matchID);
            Grid.SetColumn(mResultButton, 5);
            mGrid.Children.Add(mResultButton);
        }

        public void setup(string home, string guest)
        {
            mMatchupBlock.Text = home + " - " + guest;
            mHomeBlock.Text = "0";
            mGuestBlock.Text = "0";
        }

        public ResultButton getResultButton()
        {
            return mResultButton;
        }
    }
}
